package com.wanshi.controller;

import com.wanshi.entity.Student;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@CrossOrigin
public class TestController {

    @RequestMapping("/heihei")
    public String heihei(String username,String password) throws InterruptedException {
        System.out.println(username+"--------------"+password);


        return username+"--------------"+password;
    }

    @RequestMapping("/gaga")
    public Student heihei(@RequestBody Student student) throws InterruptedException {
        System.out.println(student);
        //Thread.sleep(3000);
        return student;
    }
}
